<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {

	function __construct()
	{
		parent::__construct();
	}

/*	function index()
	{
	//	$data['main']= "homepage";
		echo "<p style='text-align:center'> Website dang trong qua trinh xay dung. <br /> Cam on quy khach da ghe tham QueenLand Mart  <br /> </p>";
		
	}*/
function index()
{
	$data['title'] ='BDS';
	$this->load->view('template/index',$data);
	$this->lang->load('home.php'); 
}
	function intro()
{
$this->load->view('welcome_message');
}
	
	function lang($lang)
	{
		//echo $lang;
		if($lang != "" && $lang == "en")
		{
			$data["lang"]="en";
		}
		else
			$data["lang"] = "vi";
		//echo $data["lang"];
		$this->session->set_userdata($data);
		///	redirect("/home","refesh");
		//$la = $this->session->userdata("lang");
		//echo $la;
	$referer = $_SERVER['HTTP_REFERER'];
	//echo $referer;
	   if (!$referer == '' && $referer != 'http://queenlandmart.com.vn/images/home/banner.swf') {
	
		 redirect(  $referer, 'refresh');// echo '<p><a href="' . $referer . '" title="Return to the previous page">&laquo; Go back</a></p>';
	
	   } else {
	
		 redirect( base_url()."home", 'refresh');
		}
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */